package com.wuyou.demo;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/**
 * StreamFilterDemo
 *
 * @Date 2024/10/9 15:21
 * @Author 无忧
 */
public class StreamFilterDemo {

    public static void main(String[] args) {
        List<String> s = new ArrayList<>();
        s.add("1");
        s.add("2");
        s.add("3");
        s.add("4");

        List<String> collect = s.stream().filter(e -> !Objects.equals(e, "1")).collect(Collectors.toList());
        collect.forEach(System.out::println);
    }
}
